RedisAuthRepository<TUserAuth, TUserAuthDetails>
Assembly: ServiceStack.dll
Declaration
public class RedisAuthRepository<TUserAuth, TUserAuthDetails> : IUserAuthRepository, IAuthRepository, IClearable, IManageApiKeys, ICustomUserAuth, IQueryUserAuth, IUserAuthRepositoryAsync, IAuthRepositoryAsync, IClearableAsync, IManageApiKeysAsync, IQueryUserAuthAsync where TUserAuth : class, IUserAuth where TUserAuthDetails : class, IUserAuthDetails
Properties
NamespacePrefix
Declaration
public string NamespacePrefix { get; set; }
Methods
CreateUserAuth(IUserAuth, String)
Declaration
public virtual IUserAuth CreateUserAuth(IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
UpdateUserAuth(IUserAuth, IUserAuth, String)
Declaration
public virtual IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser, string password)
Returns
ServiceStack.Auth.IUserAuth
Parameters
UpdateUserAuth(IUserAuth, IUserAuth)
Declaration
public virtual IUserAuth UpdateUserAuth(IUserAuth existingUser, IUserAuth newUser)
Returns
ServiceStack.Auth.IUserAuth
Parameters
GetUserAuthByUserName(String)
Declaration
public virtual IUserAuth GetUserAuthByUserName(string userNameOrEmail)
Returns
ServiceStack.Auth.IUserAuth
Parameters
Type | Name |
---|
System.String | userNameOrEmail |
TryAuthenticate(String, String, out IUserAuth)
Declaration
public virtual bool TryAuthenticate(string userName, string password, out IUserAuth userAuth)
Returns
System.Boolean
Parameters
TryAuthenticate(Dictionary<String, String>, String, Int32, String, out IUserAuth)
Declaration
public bool TryAuthenticate(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, out IUserAuth userAuth)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | privateKey |
System.Int32 | nonceTimeOut |
System.String | sequence |
ServiceStack.Auth.IUserAuth | userAuth |
LoadUserAuth(IAuthSession, IAuthTokens)
Declaration
public virtual void LoadUserAuth(IAuthSession session, IAuthTokens tokens)
Parameters
DeleteUserAuth(String)
Declaration
public virtual void DeleteUserAuth(string userAuthId)
Parameters
Type | Name |
---|
System.String | userAuthId |
GetUserAuth(String)
Declaration
public virtual IUserAuth GetUserAuth(string userAuthId)
Returns
ServiceStack.Auth.IUserAuth
Parameters
Type | Name |
---|
System.String | userAuthId |
SaveUserAuth(IAuthSession)
Declaration
public virtual void SaveUserAuth(IAuthSession authSession)
Parameters
SaveUserAuth(IUserAuth)
Declaration
public void SaveUserAuth(IUserAuth userAuth)
Parameters
GetUserAuthDetails(String)
Declaration
public virtual List<IUserAuthDetails> GetUserAuthDetails(string userAuthId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>
Parameters
Type | Name |
---|
System.String | userAuthId |
GetUserAuth(IAuthSession, IAuthTokens)
Declaration
public virtual IUserAuth GetUserAuth(IAuthSession authSession, IAuthTokens tokens)
Returns
ServiceStack.Auth.IUserAuth
Parameters
CreateOrMergeAuthSession(IAuthSession, IAuthTokens)
Declaration
public virtual IUserAuthDetails CreateOrMergeAuthSession(IAuthSession authSession, IAuthTokens tokens)
Returns
ServiceStack.Auth.IUserAuthDetails
Parameters
InitApiKeySchema()
Declaration
public virtual void InitApiKeySchema()
ApiKeyExists(String)
Declaration
public virtual bool ApiKeyExists(string apiKey)
Returns
System.Boolean
Parameters
Type | Name |
---|
System.String | apiKey |
GetApiKey(String)
Declaration
public virtual ApiKey GetApiKey(string apiKey)
Returns
ServiceStack.Auth.ApiKey
Parameters
Type | Name |
---|
System.String | apiKey |
GetUserApiKeys(String)
Declaration
public virtual List<ApiKey> GetUserApiKeys(string userId)
Returns
System.Collections.Generic.List<ServiceStack.Auth.ApiKey>
Parameters
Type | Name |
---|
System.String | userId |
StoreAll(IEnumerable<ApiKey>)
Declaration
public virtual void StoreAll(IEnumerable<ApiKey> apiKeys)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey> | apiKeys |
Clear()
Declaration
public virtual void Clear()
CreateUserAuth()
Declaration
public IUserAuth CreateUserAuth()
Returns
ServiceStack.Auth.IUserAuth
CreateUserAuthDetails()
Declaration
public IUserAuthDetails CreateUserAuthDetails()
Returns
ServiceStack.Auth.IUserAuthDetails
GetUserAuths(String, Nullable<Int32>, Nullable<Int32>)
Declaration
public List<IUserAuth> GetUserAuths(string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
SearchUserAuths(String, String, Nullable<Int32>, Nullable<Int32>)
Declaration
public List<IUserAuth> SearchUserAuths(string query, string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
QueryUserAuths(List<IUserAuth>, String, String, Nullable<Int32>, Nullable<Int32>)
Declaration
public virtual List<IUserAuth> QueryUserAuths(List<IUserAuth> results, string query = null, string orderBy = null, int? skip = null, int? take = null)
Returns
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.Collections.Generic.List<ServiceStack.Auth.IUserAuth> | results |
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
CreateUserAuthAsync(IUserAuth, String, CancellationToken)
Declaration
public virtual async Task<IUserAuth> CreateUserAuthAsync(IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
UpdateUserAuthAsync(IUserAuth, IUserAuth, String, CancellationToken)
Declaration
public virtual async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
UpdateUserAuthAsync(IUserAuth, IUserAuth, CancellationToken)
Declaration
public virtual async Task<IUserAuth> UpdateUserAuthAsync(IUserAuth existingUser, IUserAuth newUser, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
GetUserAuthByUserNameAsync(String, CancellationToken)
Declaration
public virtual async Task<IUserAuth> GetUserAuthByUserNameAsync(string userNameOrEmail, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | userNameOrEmail |
System.Threading.CancellationToken | token |
TryAuthenticateAsync(String, String, CancellationToken)
Declaration
public virtual async Task<IUserAuth> TryAuthenticateAsync(string userName, string password, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | userName |
System.String | password |
System.Threading.CancellationToken | token |
TryAuthenticateAsync(Dictionary<String, String>, String, Int32, String, CancellationToken)
Declaration
public async Task<IUserAuth> TryAuthenticateAsync(Dictionary<string, string> digestHeaders, string privateKey, int nonceTimeOut, string sequence, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.Collections.Generic.Dictionary<System.String,System.String> | digestHeaders |
System.String | privateKey |
System.Int32 | nonceTimeOut |
System.String | sequence |
System.Threading.CancellationToken | token |
LoadUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public virtual async Task LoadUserAuthAsync(IAuthSession session, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
DeleteUserAuthAsync(String, CancellationToken)
Declaration
public virtual async Task DeleteUserAuthAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
GetUserAuthAsync(String, CancellationToken)
Declaration
public virtual async Task<IUserAuth> GetUserAuthAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
Type | Name |
---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
SaveUserAuthAsync(IAuthSession, CancellationToken)
Declaration
public virtual async Task SaveUserAuthAsync(IAuthSession authSession, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
SaveUserAuthAsync(IUserAuth, CancellationToken)
Declaration
public async Task SaveUserAuthAsync(IUserAuth userAuth, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
GetUserAuthDetailsAsync(String, CancellationToken)
Declaration
public virtual async Task<List<IUserAuthDetails>> GetUserAuthDetailsAsync(string userAuthId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuthDetails>>
Parameters
Type | Name |
---|
System.String | userAuthId |
System.Threading.CancellationToken | token |
GetUserAuthAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public virtual async Task<IUserAuth> GetUserAuthAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuth>
Parameters
CreateOrMergeAuthSessionAsync(IAuthSession, IAuthTokens, CancellationToken)
Declaration
public virtual async Task<IUserAuthDetails> CreateOrMergeAuthSessionAsync(IAuthSession authSession, IAuthTokens tokens, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.IUserAuthDetails>
Parameters
InitApiKeySchemaAsync(CancellationToken)
Declaration
public virtual Task InitApiKeySchemaAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Threading.CancellationToken | token |
ApiKeyExistsAsync(String, CancellationToken)
Declaration
public virtual async Task<bool> ApiKeyExistsAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|
System.String | apiKey |
System.Threading.CancellationToken | token |
GetApiKeyAsync(String, CancellationToken)
Declaration
public virtual async Task<ApiKey> GetApiKeyAsync(string apiKey, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<ServiceStack.Auth.ApiKey>
Parameters
Type | Name |
---|
System.String | apiKey |
System.Threading.CancellationToken | token |
GetUserApiKeysAsync(String, CancellationToken)
Declaration
public virtual async Task<List<ApiKey>> GetUserApiKeysAsync(string userId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.ApiKey>>
Parameters
Type | Name |
---|
System.String | userId |
System.Threading.CancellationToken | token |
StoreAllAsync(IEnumerable<ApiKey>, CancellationToken)
Declaration
public virtual async Task StoreAllAsync(IEnumerable<ApiKey> apiKeys, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ServiceStack.Auth.ApiKey> | apiKeys |
System.Threading.CancellationToken | token |
ClearAsync(CancellationToken)
Declaration
public virtual async Task ClearAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Threading.CancellationToken | token |
GetUserAuthsAsync(String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public async Task<List<IUserAuth>> GetUserAuthsAsync(string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
Type | Name |
---|
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
System.Threading.CancellationToken | token |
SearchUserAuthsAsync(String, String, Nullable<Int32>, Nullable<Int32>, CancellationToken)
Declaration
public async Task<List<IUserAuth>> SearchUserAuthsAsync(string query, string orderBy = null, int? skip = null, int? take = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<ServiceStack.Auth.IUserAuth>>
Parameters
Type | Name |
---|
System.String | query |
System.String | orderBy |
System.Nullable<System.Int32> | skip |
System.Nullable<System.Int32> | take |
System.Threading.CancellationToken | token |
Implements